import service from './service';

/**
 * 消息推送
 * @param topic 主题
 * @param control_param 消息参数
 * @param key 业务关键字
 * @param attach_params 附带参数
 * @example push_msg(topic, control_param, key, attach_params);
 */
export default async function push_msg(topic: string, control_param: any, key: string, attach_params: any) {
	const param = {
		BusinessKey: key,
		ControlParam: control_param,
		ToId: topic,
		attach_params
	};
	return await service('pushservice.tospecificuser', param, false, false);
}
